<?php
$this->title = '详情';
$this->params['breadcrumbs'][] = ['label' => '排班管理', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $this->title];

use common\helpers\Url;
?>

<div class="row">

    <div class="col-sm-12">
        <div class="box">
            <div class="box-body">
                <?php
                $events = array();
                foreach ($model as $plan)
                    foreach (explode(',',$plan->check_date) as $date){
                        $Event = new \yii2fullcalendar\models\Event();
                        $Event->id = $plan->id;
                        $Event->title = $plan->attendClasses->title;
                        $Event->start = date('Y-m-d\TH:i:s\Z',strtotime($date.' '.$plan->begin_time));
                        $Event->end = date('Y-m-d\TH:i:s\Z',strtotime($date.' '.$plan->end_time));
                        $events[] = $Event;
                    }
                ?>

                <?= \yii2fullcalendar\yii2fullcalendar::widget(array(
                    'events'=> $events,
                    'options' => [
                        'lang' => 'zh-cn',
                    ],
                ));

                ?>


            </div>

        </div>
    </div>
</div>
